﻿using UnityEngine;
using System.Collections;

public class UICharToDeploy : MonoBehaviour {
	public ECharModel charModel;
	public int modelId;
	public GameObject pawnGo;
	public int mNo;
	public int memmodelNo;
	void OnPress(bool isDown)
	{
		if(isDown)
		{
			Deploy();
		}
	}

	public void Deploy()
	{
		pawnGo = ArmyDeploy.Instance.Deploy(this);
		if(pawnGo!=null)
			gameObject.SetActive(false);
	}

	public void UnDeploy()
	{
		gameObject.SetActive(true);
		pawnGo.SetActive(false);
	}
}
